Repository navigation
fix: detect packages in multi-project repositories - #290
Merged
Merged
Conversation
zermelo-wisen
marked this pull request as ready for review
August 24, 2024 23:03
zermelo-wisen
force-pushed
the
fix/detect-packages-in-multi-repos
branch
from
August 28, 2024 06:42
a44ddf2 to
26a8b02
Compare
apotterri
force-pushed
the
fix/detect-packages-in-multi-repos
branch
from
August 31, 2024 10:28
26a8b02 to
7ce1654
Compare
apotterri
force-pushed
the
fix/detect-packages-in-multi-repos
branch
2 times, most recently
from
September 2, 2024 10:04
0ad98d1 to
cd7d692
Compare
These changes fix a test failure that happened in my dev environment. They make sure to use a directory created by @tempdir, rather than just using java.io.tmpdir (a very full/messy tmp directory was causing one of the config tests to fail). Also, a new .gitignore hides the intellij download created for tests in agent/test/intellij.
apotterri
force-pushed
the
fix/detect-packages-in-multi-repos
branch
from
September 2, 2024 12:00
cd7d692 to
c85a803
Compare
apotterri
approved these changes
Sep 2, 2024
|
🎉 This PR is included in version 1.27.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #283.
This PR addresses the issue of failure to autodetect package names in some multi-project repositories. Specifically, the Java AppMap agent was unable to auto-detect packages in the multi-project structure of the Retrofit repository. The agent only looked for
src/main/javadirectories, which led to anappmap.ymlconfiguration file with no detected packages, as shown below:The repository is structured with multiple subprojects, each containing their own
src/main/javadirectories:Changes Made
AppMapConfig.java: Updated
AppMapConfig.javato traverse the root directory and collect packages from all relevantsrc/main/javadirectories across subprojects.collectPackagesto encapsulate the logic for collecting Java packages.src/main/javasubdirectories.agent_cli.bats: Updated the test for the CLI agent initialization to verify the detection of packages within subprojects.
Test Project Structure: Added a sample subproject structure to the test project for verifying the updated behavior.